// logviewerDlg.h : header file
//

#pragma once
#include "base/logcontent.h"
#include <vector>
// ClogviewerDlg dialog
class ClogviewerDlg : public CDialog
{
// Construction
public:
	ClogviewerDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_LOGVIEWER_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
    afx_msg void OnConnect();
	DECLARE_MESSAGE_MAP()
private:
    LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
    void DisConnectTarget();
    void ConnectTarget();
    void ClearLog();
    void InitLogListCtrl();
    void AddLog();
    BOOL m_bConnected;
    HWND m_hHostWnd;
    Base::Log::Type     m_logLevelType;
    CListCtrl           m_logListCtrl;
    typedef std::vector<Base::Log::CLogContent*> LogContentVec;
    LogContentVec m_vecLogContent;
    CString             m_strTargetProcess;
};
